import pytest
from log import log_set
from mail import  send_mail
import allure
import os
if __name__ == '__main__':
    # log_set()
    # pytest.main(['-s','testcase.py'])
    # send_mail(["log.txt"])
    pytest.main(['-s','testcase.py',"--alluredir=报告数据","--clean-alluredir"])
    os.system("allure generate 报告数据 -o 测试报告 --clean")
    send_mail(['log.txt','测试报告./index.html'])
